<!-- 图片放大 -->
<template>
  <div>
    <div>
      <div class="mask" @click="closeTip"></div>
      <div class="show_img">
        <div>
          <i @click="closeTip">
            <img class="close_icon" src="../../assets/img/common/close_white.png"/>
          </i>
          <img :src="icon" class="imgs">
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: ['icon'],
  data() {
    return {}
  },
  mounted() {

  },
  methods: {
    closeTip() {
      this.$emit('listenToChildEvent', false)
    }
  }
}
</script>

<style scoped>
.show_img {
  position: fixed;
  z-index: 10001;
  max-height: 672px;
  transform: translate(-50%, -50%);
  left: 50%;
  top: 50%;
  display: flex;
  align-items: center;
}

.mask {
  z-index: 10000;
}

.imgs {
  max-height: 672px;
}

.show_img div {
  position: relative;
}

.show_img i {
  position: absolute;
  right: -30px;
  top: -30px;
  z-index: 1;
  width: 25px;
  height: 25px;
  background: rgba(1, 1, 1, 0.6);
  border-radius: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  -webkit-transition: all .4s linear;
  -moz-transition: all .4s linear;
  -ms-transition: all .4s linear;
  transition: all .4s linear;
}

.show_img i:hover {
  -webkit-transform: rotate(180deg);
  -moz-transform: rotate(180deg);
  -ms-transform: rotate(180deg);
  transform: rotate(180deg)
}

.close_icon {
  width: 18px;
  height: 18px;
}

</style>
